package com.yan.springbootstudy.common.datasource;

public class DataOperationContextHolder {
	private static ThreadLocal<DataOperationContext> dataOperationContextHolder = new ThreadLocal<DataOperationContext>();

	public static DataOperationContext getDataOperationContext() {
		return dataOperationContextHolder.get();
	}

	public static void setDataOperationContext(DataOperationContext dataOperationContext) {
		dataOperationContextHolder.set(dataOperationContext);
	}

    public static void removeDataOperationContext() {  
    	dataOperationContextHolder.remove();  
    } 
}
